# -*- coding: UTF-8 -*-
from psina.action.follow4sina import FollowUser
import json
import time

class Worker:
    
    def __init__(self):
        self.follow = FollowUser()
        
    def work(self, routeKey, body):
            if "follow:user" == routeKey:
                obj = json.loads(body.decode('unicode_escape'))
                self.follow.follow(obj.get("uid"))
                time.sleep(5)
            
            
        
        